package com.company.indicationshots.util;

import android.view.View;
import android.widget.AdapterView;
import android.widget.Spinner;

import com.company.indicationshots.adapter.FuncSettingSpinnerAdapter;
//功能设置下拉框点击响应类
public class FuncSpinnerClick {
    public static void onClickSelectItem(FuncSettingSpinnerAdapter spinnerAdapter, Spinner spinner) {
        // 设置OnItemSelectedListener
        spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
                // 在这里执行你的自定义逻辑
                spinnerAdapter.setSelectItem(position);
            }

            @Override
            public void onNothingSelected(AdapterView<?> parent) {

            }
        });
    }
}
